Remove chain walk for OCSP responder#10532
Merged
Merged
Conversation
82f2600 to
9378a1c
Compare
|
retest this please |
…t compliant with RFC 6960, 4.2.2.2. remove unused vp parameter Update ChangeLog.md to include OCSP responder change
authorized any responder issued by an ancestor of the target's issuer;
RFC 6960 4.2.2.2 requires direct issuance by the CA identified in the
request.
- Remove CheckOcspResponderChain() and WOLFSSL_NO_OCSP_ISSUER_CHAIN_CHECK.
- Drop now-unused vp parameter from CheckOcspResponder() and the
OcspRespCheck() helper; cascade through template and non-template
paths.
OCSP test blobs:
- Re-sign resp_server1_cert with intermediate1-ca (CA-direct path).
- Add resp_server1_cert_ancestor_responder for the negative test.
- Embed server1_cert_pem[] in test_ocsp_test_blobs.h so the new test
runs under NO_FILESYSTEM; matching entry added to
create_ocsp_test_blobs.py.
- Regenerate response[] in test_certman.c with intermediate1-ca as
signer; recipe switched from Wireshark export to openssl -respout
+ xxd -i for reproducibility.
- Fix self-XOR in test_wolfSSL_CertManagerCheckOCSPResponse so the
serial byte actually flips (^= 0xFF).
Live OCSP coverage:
- Add ocsp-responder-int1 (delegated responder issued directly by
intermediate1-ca, with id-kp-OCSPSigning EKU) for the
responder->intermediate->root chain.
- scripts/ocsp-stapling.test: intermediate1 responder switched to
ocsp-responder-int1 (delegated path).
- scripts/ocsp-stapling2.test, scripts/ocsp-stapling_tls13multi.test:
intermediate2 and intermediate3 sign their OCSP responses with
their own CA keys (CA-direct path); root block unchanged
(ocsp-responder-cert is still RFC-compliant for root-issued certs).
- .github/workflows/ocsp.yml: server1 OCSP responder switched to
ocsp-responder-int1 to match the cert chain.
- New test_ocsp_ancestor_responder_rejected confirms the
ancestor-issued response is rejected with OCSP_LOOKUP_FAIL.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #10532
Scan targets checked: wolfcrypt-bugs, wolfcrypt-rs-bugs, wolfcrypt-src, wolfssl-bugs, wolfssl-src
No new issues found in the changed files. ✅
douzzer
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes
CheckOcspResponderChain()which was not compliant with RFC 6960 4.2.2.2. for hardening. The chain walk authorized any OCSP responder cert issued by an ancestor of the target's issuer. RFCrequires issuance directly by the CA identified in the request. Also removes references to related macro
WOLFSSL_NO_OCSP_ISSUER_CHAIN_CHECK.Drops the now-unused
vpparameter fromCheckOcspResponder()and cascades through the staticOcspRespCheck()helper. Updates the prototype inwolfssl/ocsp.h, the definition insrc/ocsp.c, and call sites acrosswolfcrypt/src/asn.c,wolfcrypt/src/asn_orig.c, andsrc/ocsp.c.Updates OCSP test blobs to reflect updated functionality.
resp_server1_certwithintermediate1-ca(Was previously signed byocsp-responder-cert- issued by root, not intermediate1)resp_server1_cert_ancestor_responder- preserves the old ancestor-issued shape for negative testingresponse[]re-captured withintermediate1-caas signer. Recipe comment switched from Wireshark toopenssl -respout+xxd -Irequest->serial[0] ^= request->serial[0]) intest_wolfSSL_CertManagerCheckOCSPResponseso the serial byte actually flips (^= 0xFF)Updates live OCSP tests to exercise both RFC 6960 4.2.2.2 authorization paths the implementation supports (CA-direct, delegated responder):
certs/ocsp/ocsp-responder-int1-{cert,key}.{pem,der}(delegated responder issued directly byintermediate1-ca, withid-kp-OCSPSigningEKU). Provides live coverage of the delegated path across a responder→intermediate→root chain.update_certentry incerts/ocsp/renewcerts.shand matchingEXTRA_DISTlines incerts/ocsp/include.amfor int1test-leaf-response.derusingocsp-responder-int1scripts/ocsp-stapling.test: intermediate1 responder switched fromocsp-responder-cert.pemtoocsp-responder-int1(delegated path)scripts/ocsp-stapling2.test,scripts/ocsp-stapling_tls13multi.test: intermediate2 / intermediate3 responders sign their OCSP responses directly with their CA keys (CA-direct path); the root-CA blocks remain unchanged (ocsp-responder-certis stillRFC-compliant for root-issued certs)
.github/workflows/ocsp.yml: server1 OCSP responder switched toocsp-responder-int1to match the cert chainAdds
test_ocsp_ancestor_responder_rejectedunit test.ChangeLog.mdhas been updated to make note of removed function and related content.Addresses zd#21800
Testing
./configure --enable-ocsp --enable-ocsp-responder && make check./configure --enable-all && make checkChecklist